//
//  WDLocationManager.h
//  LocationDemo
//
//  Created by superwu_work on 16/5/25.
//  Copyright © 2016年 superwu_work. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface WDLocationManager : NSObject

typedef NS_ENUM(NSInteger, MLLocationDistance) {
    MLLocationAccuracyBest = 0,
    MLLocationAccuracyNearestTenMeters,
    MLLocationAccuracyHundredMeters,
    MLLocationAccuracyKilometer,
    MLLocationAccuracyThreeKilometers
};

///默认精度最好
@property (nonatomic, assign)MLLocationDistance distance;
///默认最大距离更新坐标
@property (nonatomic, assign)CGFloat distanceFilter;

/**
 获取地理位置类
 */
+ (WDLocationManager *)locations;



/**
 GPS定位获取当前位置，X若失败可调用IP定位获取位置X(ip要网络请求先不写 百度AK不会下次再说)，位置字典key为lat(纬度)和long(经度);
 */
- (void)getCurrentLocations:(void(^)(NSDictionary *curLoc))success error:(void(^)(NSError  *error))errors;

/**
 获取当前坐标点的位置信息，字典包含lat(纬度)，long(经度)， country(国家)，State(省)，city(城市)，subLocality(城区)，thoroughfare(大道)，street(街道)
 */
- (void)getCurrentAddress:(void(^)(NSMutableDictionary *citys))address error:(void(^)(NSError *error))locError;


/**
 获取坐标点的位置信息，字典包含lat(纬度)，long(经度)， country(国家)，State(省)，city(城市)，subLocality(城区)，thoroughfare(大道)，street(街道)
 */
- (void)getLocAddress:(NSString *)lat withLon:(NSString *)lon address:(void(^)(NSMutableDictionary *citys))address error:(void(^)(NSError *error))getFail;

/**
 停止定位
 */
- (void)stopUpdatingLocation;


@end
